﻿using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VIA.SiMoJi.Domain.Vision
{
    [AddINotifyPropertyChangedInterface]
    public class RotationCenter
    {
        public double X { get; set; }
        public double Y { get; set; }
        /// <summary>
        /// 角度单位：度
        /// </summary>
        public double Radius { get; set; }

        //构造函数
        public RotationCenter()
        {
        }
        public RotationCenter(double x, double y, double raduis)
        {
            this.X = x;
            this.Y = y;
            this.Radius = raduis;
        }

        //Pose转矩阵
        public CMatrix ToMatrix(double angle)
        {
            CMatrix colMatrix = new();
            colMatrix.RotateAt(angle, X, Y);
            return colMatrix;
        }

        public override string ToString()
        {
            return $"X:{X:0.###}, Y:{Y:0.###}, R:{Radius:0.###}";
        }
    }
}
